class Solution:
    def minimumMoves(self, s: str) -> int:
        sum = 0
        flag = 1
        i = 0
        if 'X' not in s:
            return 0
        while flag:
            if s[i] == 'X':
                sum +=1
                if i+3 >len(s) -1:
                    flag = 0
                else:
                    i += 3
            else: i+=1
        return sum


if __name__ == '__main__':
    s = "OXOX"
    solution = Solution()
    val = solution.minimumMoves(s)
    print(val)
